package com.example.prarranque5;

import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends Activity implements View.OnClickListener {

    public static int white= Color.WHITE, blue=Color.BLUE, red=Color.RED,
            green=Color.GREEN, black=Color.BLACK ;

    private Button creditsButton, playButton, helpButton, dynamicButton, pruebaButton;
    private TextView prtext ;

    public int intcaca ;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        playButton = (Button) findViewById(R.id.playButton) ;
        playButton.setOnClickListener(this);

        helpButton = (Button) findViewById(R.id.helpButton) ;
        helpButton.setOnClickListener(this);

        creditsButton = (Button) findViewById(R.id.creditsButton) ;
        creditsButton.setOnClickListener(this);

        dynamicButton = (Button) findViewById(R.id.dynamicButton) ;
        dynamicButton.setOnClickListener(this);

        pruebaButton = (Button) findViewById(R.id.pruebaButton) ;
        pruebaButton.setOnClickListener(this);

//        prtext = (TextView) findViewById(R.id.creditsButton);

    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }


    public void onClick(View v) {

        if(v.getId()==R.id.creditsButton)
            {
//                intcaca = 42 ;
//                prtext.setText("" + intcaca);
//                setContentView(R.layout.cl);

                Intent intent1 = new Intent(this, creditsActivity.class);
                this.startActivity(intent1);
            }


        if(v.getId()==R.id.dynamicButton)
        {
//                intcaca = 42 ;
//                prtext.setText("" + intcaca);
//                setContentView(R.layout.cl);

            Intent intent1 = new Intent(this, prDynPlot.class);
            this.startActivity(intent1);
        }


        if(v.getId()==R.id.pruebaButton)
        {
//                intcaca = 42 ;
//                prtext.setText("" + intcaca);
//                setContentView(R.layout.cl);

            Intent intent1 = new Intent(this, prxyplot.class);
            this.startActivity(intent1);
        }
    }



}
